package main

import (
	"fmt"
	"github.com/spf13/cobra"
	"github.com/zeromicro/go-zero/core/logx"
	"insighttracking/apps/customer/bootstrap"
	"log"
)

var Version = "1.0.0"

func main() {
	// 修改日志输出格式
	logx.MustSetup(logx.LogConf{Stat: false, Encoding: "plain"})
	root := &cobra.Command{Use: "customer-api", Version: Version}
	root.CompletionOptions.DisableDefaultCmd = true

	root.AddCommand(bootstrap.Start)
	root.AddCommand(bootstrap.Stop)
	root.AddCommand(bootstrap.Restart)
	err := root.Execute()
	if err != nil {
		fmt.Println("service boot err:" + err.Error())
		log.Fatal(err)
	}
}
